<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Graph API: Operations on matrices</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Graph API: Operations on matrices<div class="ingroups"><a class="el" href="../../df/d1f/group__gapi__core.html">G-API Core functionality</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaf923b18b9f56f6ecdbb23b380a99a413"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaf923b18b9f56f6ecdbb23b380a99a413">cv::gapi::absDiff</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2)</td></tr>
<tr class="memdesc:gaf923b18b9f56f6ecdbb23b380a99a413"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the per-element absolute difference between two matrices.  <a href="../../d0/d86/group__gapi__matrixop.html#gaf923b18b9f56f6ecdbb23b380a99a413">More...</a><br/></td></tr>
<tr class="separator:gaf923b18b9f56f6ecdbb23b380a99a413"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6a59513a83d79899345a39ee3497ba47"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga6a59513a83d79899345a39ee3497ba47">cv::gapi::absDiffC</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;c)</td></tr>
<tr class="memdesc:ga6a59513a83d79899345a39ee3497ba47"><td class="mdescLeft"> </td><td class="mdescRight">Calculates absolute value of matrix elements.  <a href="../../d0/d86/group__gapi__matrixop.html#ga6a59513a83d79899345a39ee3497ba47">More...</a><br/></td></tr>
<tr class="separator:ga6a59513a83d79899345a39ee3497ba47"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga60503b0500750881cc58a60e7eae084b"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b">cv::gapi::addWeighted</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, double alpha, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2, double beta, double gamma, int ddepth=-1)</td></tr>
<tr class="memdesc:ga60503b0500750881cc58a60e7eae084b"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the weighted sum of two matrices.  <a href="../../d0/d86/group__gapi__matrixop.html#ga60503b0500750881cc58a60e7eae084b">More...</a><br/></td></tr>
<tr class="separator:ga60503b0500750881cc58a60e7eae084b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa5f87ba17bf7d6acb1b557a4b94bae8b"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../de/dfd/classcv_1_1GOpaque.html">GOpaque</a>&lt; int &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaa5f87ba17bf7d6acb1b557a4b94bae8b">cv::gapi::countNonZero</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:gaa5f87ba17bf7d6acb1b557a4b94bae8b"><td class="mdescLeft"> </td><td class="mdescRight">Counts non-zero array elements.  <a href="../../d0/d86/group__gapi__matrixop.html#gaa5f87ba17bf7d6acb1b557a4b94bae8b">More...</a><br/></td></tr>
<tr class="separator:gaa5f87ba17bf7d6acb1b557a4b94bae8b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga76246465115220c5e5986a55298300c7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga76246465115220c5e5986a55298300c7">cv::gapi::inRange</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;threshLow, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;threshUp)</td></tr>
<tr class="memdesc:ga76246465115220c5e5986a55298300c7"><td class="mdescLeft"> </td><td class="mdescRight">Applies a range-level threshold to each matrix element.  <a href="../../d0/d86/group__gapi__matrixop.html#ga76246465115220c5e5986a55298300c7">More...</a><br/></td></tr>
<tr class="separator:ga76246465115220c5e5986a55298300c7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga9e3e85496c0c314bbb60fabf8eb09c0a"><td align="right" class="memItemLeft" valign="top">std::tuple&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga9e3e85496c0c314bbb60fabf8eb09c0a">cv::gapi::integral</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, int sdepth=-1, int sqdepth=-1)</td></tr>
<tr class="memdesc:ga9e3e85496c0c314bbb60fabf8eb09c0a"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the integral of an image.  <a href="../../d0/d86/group__gapi__matrixop.html#ga9e3e85496c0c314bbb60fabf8eb09c0a">More...</a><br/></td></tr>
<tr class="separator:ga9e3e85496c0c314bbb60fabf8eb09c0a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0ff081ea80eb39a96389c16ac0f9e944"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944">cv::gapi::max</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2)</td></tr>
<tr class="memdesc:ga0ff081ea80eb39a96389c16ac0f9e944"><td class="mdescLeft"> </td><td class="mdescRight">Calculates per-element maximum of two matrices.  <a href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944">More...</a><br/></td></tr>
<tr class="separator:ga0ff081ea80eb39a96389c16ac0f9e944"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab714c7a4adc847d75bfc080ac92924f4"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4">cv::gapi::min</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src1, const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src2)</td></tr>
<tr class="memdesc:gab714c7a4adc847d75bfc080ac92924f4"><td class="mdescLeft"> </td><td class="mdescRight">Calculates per-element minimum of two matrices.  <a href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4">More...</a><br/></td></tr>
<tr class="separator:gab714c7a4adc847d75bfc080ac92924f4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4d4f56eea9f26736f7d0c703b377f9e7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga4d4f56eea9f26736f7d0c703b377f9e7">cv::gapi::normInf</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:ga4d4f56eea9f26736f7d0c703b377f9e7"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the absolute infinite norm of a matrix.  <a href="../../d0/d86/group__gapi__matrixop.html#ga4d4f56eea9f26736f7d0c703b377f9e7">More...</a><br/></td></tr>
<tr class="separator:ga4d4f56eea9f26736f7d0c703b377f9e7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga238421ed8e075474f03acb06e7168b26"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga238421ed8e075474f03acb06e7168b26">cv::gapi::normL1</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:ga238421ed8e075474f03acb06e7168b26"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the absolute <a class="el" href="../../d4/d7f/structcv_1_1L1.html">L1</a> norm of a matrix.  <a href="../../d0/d86/group__gapi__matrixop.html#ga238421ed8e075474f03acb06e7168b26">More...</a><br/></td></tr>
<tr class="separator:ga238421ed8e075474f03acb06e7168b26"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaeb09f3519bcc89b23ededc3925b9916f"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaeb09f3519bcc89b23ededc3925b9916f">cv::gapi::normL2</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:gaeb09f3519bcc89b23ededc3925b9916f"><td class="mdescLeft"> </td><td class="mdescRight">Calculates the absolute <a class="el" href="../../dc/daa/structcv_1_1L2.html">L2</a> norm of a matrix.  <a href="../../d0/d86/group__gapi__matrixop.html#gaeb09f3519bcc89b23ededc3925b9916f">More...</a><br/></td></tr>
<tr class="separator:gaeb09f3519bcc89b23ededc3925b9916f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga58d80f9e109fed142b280d673afb795a"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga58d80f9e109fed142b280d673afb795a">cv::gapi::sum</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src)</td></tr>
<tr class="memdesc:ga58d80f9e109fed142b280d673afb795a"><td class="mdescLeft"> </td><td class="mdescRight">Calculates sum of all matrix elements.  <a href="../../d0/d86/group__gapi__matrixop.html#ga58d80f9e109fed142b280d673afb795a">More...</a><br/></td></tr>
<tr class="separator:ga58d80f9e109fed142b280d673afb795a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad538f94c264624d0ea78b853d53adcb2"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gad538f94c264624d0ea78b853d53adcb2">cv::gapi::threshold</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;thresh, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;maxval, int type)</td></tr>
<tr class="memdesc:gad538f94c264624d0ea78b853d53adcb2"><td class="mdescLeft"> </td><td class="mdescRight">Applies a fixed-level threshold to each matrix element.  <a href="../../d0/d86/group__gapi__matrixop.html#gad538f94c264624d0ea78b853d53adcb2">More...</a><br/></td></tr>
<tr class="separator:gad538f94c264624d0ea78b853d53adcb2"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga33361fa1e5bdd6201cb23ced85e7eeae"><td align="right" class="memItemLeft" valign="top">std::tuple&lt; <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga33361fa1e5bdd6201cb23ced85e7eeae">cv::gapi::threshold</a> (const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp;src, const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp;maxval, int type)</td></tr>
<tr class="separator:ga33361fa1e5bdd6201cb23ced85e7eeae"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf923b18b9f56f6ecdbb23b380a99a413"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf923b18b9f56f6ecdbb23b380a99a413">◆ </a></span>absDiff()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::absDiff </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the per-element absolute difference between two matrices. </p>
<p>The function absDiff calculates absolute difference between two matrices of the same size and depth: </p><p class="formulaDsp">
\[\texttt{dst}(I) = \texttt{saturate} (| \texttt{src1}(I) - \texttt{src2}(I)|)\]
</p>
<p> where I is a multi-dimensional index of matrix elements. In case of multi-channel matrices, each channel is processed independently. Output matrix must have the same size and depth as input matrices.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.absdiff" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d2/d75/namespacecv.html#af6df65b17fb11af6d34634b6dfa44683">abs</a> </dd></dl>
</div>
</div>
<a id="ga6a59513a83d79899345a39ee3497ba47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6a59513a83d79899345a39ee3497ba47">◆ </a></span>absDiffC()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::absDiffC </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>c</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates absolute value of matrix elements. </p>
<p>The function abs calculates absolute difference between matrix elements and given scalar value: </p><p class="formulaDsp">
\[\texttt{dst}(I) = \texttt{saturate} (| \texttt{src1}(I) - \texttt{matC}(I)|)\]
</p>
<p> where matC is constructed from given scalar c and has the same sizes and depth as input matrix src.</p>
<p>Output matrix must be of the same size and depth as src.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.absdiffC" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
    <tr><td class="paramname">c</td><td>scalar to be subtracted. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4" title="Calculates per-element minimum of two matrices. ">min</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944" title="Calculates per-element maximum of two matrices. ">max</a> </dd></dl>
</div>
</div>
<a id="ga60503b0500750881cc58a60e7eae084b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga60503b0500750881cc58a60e7eae084b">◆ </a></span>addWeighted()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::addWeighted </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>alpha</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>beta</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>gamma</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the weighted sum of two matrices. </p>
<p>The function addWeighted calculates the weighted sum of two matrices as follows: </p><p class="formulaDsp">
\[\texttt{dst} (I)= \texttt{saturate} ( \texttt{src1} (I)* \texttt{alpha} + \texttt{src2} (I)* \texttt{beta} + \texttt{gamma} )\]
</p>
<p> where I is a multi-dimensional index of array elements. In case of multi-channel matrices, each channel is processed independently.</p>
<p>The function can be replaced with a matrix expression: </p><p class="formulaDsp">
\[\texttt{dst}(I) = \texttt{alpha} * \texttt{src1}(I) - \texttt{beta} * \texttt{src2}(I) + \texttt{gamma} \]
</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.addweighted" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">alpha</td><td>weight of the first matrix elements. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix of the same size and channel number as src1. </td></tr>
    <tr><td class="paramname">beta</td><td>weight of the second matrix elements. </td></tr>
    <tr><td class="paramname">gamma</td><td>scalar added to each sum. </td></tr>
    <tr><td class="paramname">ddepth</td><td>optional depth of the output matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#ga3fec036f5cf3f6cb8c2633c109085f0b" title="Calculates the per-element sum of two matrices. ">add</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gab2a1ac8bdeda1de78ec97f9cd8e9ff0a" title="Calculates the per-element difference between two matrices. ">sub</a> </dd></dl>
</div>
</div>
<a id="gaa5f87ba17bf7d6acb1b557a4b94bae8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa5f87ba17bf7d6acb1b557a4b94bae8b">◆ </a></span>countNonZero()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../de/dfd/classcv_1_1GOpaque.html">GOpaque</a>&lt;int&gt; cv::gapi::countNonZero </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Counts non-zero array elements. </p>
<p>The function returns the number of non-zero elements in src : </p><p class="formulaDsp">
\[\sum _{I: \; \texttt{src} (I) \ne0 } 1\]
</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.countNonZero" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input single-channel matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../da/dd3/group__gapi__math.html#gaa37ea1b811bcc3e26ee1b3fb00acc55c" title="Calculates an average (mean) of matrix elements. ">mean</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4" title="Calculates per-element minimum of two matrices. ">min</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944" title="Calculates per-element maximum of two matrices. ">max</a> </dd></dl>
</div>
</div>
<a id="ga76246465115220c5e5986a55298300c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76246465115220c5e5986a55298300c7">◆ </a></span>inRange()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::inRange </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>threshLow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>threshUp</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Applies a range-level threshold to each matrix element. </p>
<p>The function applies range-level thresholding to a single- or multiple-channel matrix. It sets output pixel value to OxFF if the corresponding pixel value of input matrix is in specified range,or 0 otherwise.</p>
<p>Input and output matrices must be CV_8UC1.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.inRange"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix (CV_8UC1). </td></tr>
    <tr><td class="paramname">threshLow</td><td>lower boundary value. </td></tr>
    <tr><td class="paramname">threshUp</td><td>upper boundary value.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gad538f94c264624d0ea78b853d53adcb2" title="Applies a fixed-level threshold to each matrix element. ">threshold</a> </dd></dl>
</div>
</div>
<a id="ga9e3e85496c0c314bbb60fabf8eb09c0a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9e3e85496c0c314bbb60fabf8eb09c0a">◆ </a></span>integral()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>&gt; cv::gapi::integral </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>sdepth</em> = <code>-1</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>sqdepth</em> = <code>-1</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the integral of an image. </p>
<p>The function calculates one or more integral images for the source image as follows:</p>
<p class="formulaDsp">
\[\texttt{sum} (X,Y) = \sum _{x&lt;X,y&lt;Y} \texttt{image} (x,y)\]
</p>
<p class="formulaDsp">
\[\texttt{sqsum} (X,Y) = \sum _{x&lt;X,y&lt;Y} \texttt{image} (x,y)^2\]
</p>
<p>The function return integral image as \((W+1)\times (H+1)\) , 32-bit integer or floating-point (32f or 64f) and integral image for squared pixel values; it is \((W+1)\times (H+)\), double-precision floating-point (64f) array.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.integral"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input image. </td></tr>
    <tr><td class="paramname">sdepth</td><td>desired depth of the integral and the tilted integral images, CV_32S, CV_32F, or CV_64F. </td></tr>
    <tr><td class="paramname">sqdepth</td><td>desired depth of the integral image of squared pixel values, CV_32F or CV_64F. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga0ff081ea80eb39a96389c16ac0f9e944"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0ff081ea80eb39a96389c16ac0f9e944">◆ </a></span>max()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::max </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates per-element maximum of two matrices. </p>
<p>The function max calculates the per-element maximum of two matrices of the same size, number of channels and depth: </p><p class="formulaDsp">
\[\texttt{dst} (I)= \max ( \texttt{src1} (I), \texttt{src2} (I))\]
</p>
<p> where I is a multi-dimensional index of matrix elements. In case of multi-channel matrices, each channel is processed independently. Output matrix must be of the same size and depth as src1.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.max" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix of the same size and depth as src1. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4" title="Calculates per-element minimum of two matrices. ">min</a>, <a class="el" href="../../d2/de8/group__core__array.html#ga303cfb72acf8cbb36d884650c09a3a97" title="Performs the per-element comparison of two arrays or an array and scalar value. ">compare</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#gaea61a43cc393b6bfa81fc57007df28d2" title="Performs the per-element comparison of two matrices checking if elements from first matrix are equal ...">cmpEQ</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#gae7804b39335c3a62d21e7afd1c1fa566" title="Performs the per-element comparison of two matrices checking if elements from first matrix are greate...">cmpGT</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#ga2b13187939387e99b4a7dbc497d9d52d" title="Performs the per-element comparison of two matrices checking if elements from first matrix are greate...">cmpGE</a> </dd></dl>
</div>
</div>
<a id="gab714c7a4adc847d75bfc080ac92924f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab714c7a4adc847d75bfc080ac92924f4">◆ </a></span>min()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::min </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src2</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates per-element minimum of two matrices. </p>
<p>The function min calculates the per-element minimum of two matrices of the same size, number of channels and depth: </p><p class="formulaDsp">
\[\texttt{dst} (I)= \min ( \texttt{src1} (I), \texttt{src2} (I))\]
</p>
<p> where I is a multi-dimensional index of matrix elements. In case of multi-channel matrices, each channel is processed independently. Output matrix must be of the same size and depth as src1.</p>
<p>Supported input matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.min" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src1</td><td>first input matrix. </td></tr>
    <tr><td class="paramname">src2</td><td>second input matrix of the same size and depth as src1. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944" title="Calculates per-element maximum of two matrices. ">max</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#gaea61a43cc393b6bfa81fc57007df28d2" title="Performs the per-element comparison of two matrices checking if elements from first matrix are equal ...">cmpEQ</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#gaa67732d475ab1df386eebff7b90895da" title="Performs the per-element comparison of two matrices checking if elements from first matrix are less t...">cmpLT</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#ga1a745b957e7f94c416a5773a13524576" title="Performs the per-element comparison of two matrices checking if elements from first matrix are less o...">cmpLE</a> </dd></dl>
</div>
</div>
<a id="ga4d4f56eea9f26736f7d0c703b377f9e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4d4f56eea9f26736f7d0c703b377f9e7">◆ </a></span>normInf()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> cv::gapi::normInf </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the absolute infinite norm of a matrix. </p>
<p>This version of normInf calculates the absolute infinite norm of src.</p>
<p>As example for one array consider the function \(r(x)= \begin{pmatrix} x \\ 1-x \end{pmatrix}, x \in [-1;1]\). The \( L_{\infty} \) norm for the sample value \(r(-1) = \begin{pmatrix} -1 \\ 2 \end{pmatrix}\) is calculated as follows </p><p class="formulaDsp">
\begin{align*} \| r(-1) \|_{L_\infty} &amp;= \max(|-1|,|2|) = 2 \end{align*}
</p>
<p> and for \(r(0.5) = \begin{pmatrix} 0.5 \\ 0.5 \end{pmatrix}\) the calculation is </p><p class="formulaDsp">
\begin{align*} \| r(0.5) \|_{L_\infty} &amp;= \max(|0.5|,|0.5|) = 0.5. \end{align*}
</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.norminf" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga238421ed8e075474f03acb06e7168b26" title="Calculates the absolute L1 norm of a matrix. ">normL1</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaeb09f3519bcc89b23ededc3925b9916f" title="Calculates the absolute L2 norm of a matrix. ">normL2</a> </dd></dl>
</div>
</div>
<a id="ga238421ed8e075474f03acb06e7168b26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga238421ed8e075474f03acb06e7168b26">◆ </a></span>normL1()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> cv::gapi::normL1 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the absolute <a class="el" href="../../d4/d7f/structcv_1_1L1.html">L1</a> norm of a matrix. </p>
<p>This version of normL1 calculates the absolute <a class="el" href="../../d4/d7f/structcv_1_1L1.html">L1</a> norm of src.</p>
<p>As example for one array consider the function \(r(x)= \begin{pmatrix} x \\ 1-x \end{pmatrix}, x \in [-1;1]\). The \( L_{1} \) norm for the sample value \(r(-1) = \begin{pmatrix} -1 \\ 2 \end{pmatrix}\) is calculated as follows </p><p class="formulaDsp">
\begin{align*} \| r(-1) \|_{L_1} &amp;= |-1| + |2| = 3 \\ \end{align*}
</p>
<p> and for \(r(0.5) = \begin{pmatrix} 0.5 \\ 0.5 \end{pmatrix}\) the calculation is </p><p class="formulaDsp">
\begin{align*} \| r(0.5) \|_{L_1} &amp;= |0.5| + |0.5| = 1 \\ \end{align*}
</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.norml1" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaeb09f3519bcc89b23ededc3925b9916f" title="Calculates the absolute L2 norm of a matrix. ">normL2</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga4d4f56eea9f26736f7d0c703b377f9e7" title="Calculates the absolute infinite norm of a matrix. ">normInf</a> </dd></dl>
</div>
</div>
<a id="gaeb09f3519bcc89b23ededc3925b9916f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeb09f3519bcc89b23ededc3925b9916f">◆ </a></span>normL2()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> cv::gapi::normL2 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates the absolute <a class="el" href="../../dc/daa/structcv_1_1L2.html">L2</a> norm of a matrix. </p>
<p>This version of normL2 calculates the absolute <a class="el" href="../../dc/daa/structcv_1_1L2.html">L2</a> norm of src.</p>
<p>As example for one array consider the function \(r(x)= \begin{pmatrix} x \\ 1-x \end{pmatrix}, x \in [-1;1]\). The \( L_{2} \) norm for the sample value \(r(-1) = \begin{pmatrix} -1 \\ 2 \end{pmatrix}\) is calculated as follows </p><p class="formulaDsp">
\begin{align*} \| r(-1) \|_{L_2} &amp;= \sqrt{(-1)^{2} + (2)^{2}} = \sqrt{5} \\ \end{align*}
</p>
<p> and for \(r(0.5) = \begin{pmatrix} 0.5 \\ 0.5 \end{pmatrix}\) the calculation is </p><p class="formulaDsp">
\begin{align*} \| r(0.5) \|_{L_2} &amp;= \sqrt{(0.5)^{2} + (0.5)^{2}} = \sqrt{0.5} \\ \end{align*}
</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>. </p><dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.norml2" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga238421ed8e075474f03acb06e7168b26" title="Calculates the absolute L1 norm of a matrix. ">normL1</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga4d4f56eea9f26736f7d0c703b377f9e7" title="Calculates the absolute infinite norm of a matrix. ">normInf</a> </dd></dl>
</div>
</div>
<a id="ga58d80f9e109fed142b280d673afb795a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga58d80f9e109fed142b280d673afb795a">◆ </a></span>sum()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> cv::gapi::sum </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Calculates sum of all matrix elements. </p>
<p>The function sum calculates sum of all matrix elements, independently for each channel.</p>
<p>Supported matrix data types are <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga404fd4e4553b57c481b7fac31aedcd2b">CV_16UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga3515053e24377cf079fa1027d208ad52">CV_16SC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.sum" </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gaa5f87ba17bf7d6acb1b557a4b94bae8b" title="Counts non-zero array elements. ">countNonZero</a>, <a class="el" href="../../da/dd3/group__gapi__math.html#gaa37ea1b811bcc3e26ee1b3fb00acc55c" title="Calculates an average (mean) of matrix elements. ">mean</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4" title="Calculates per-element minimum of two matrices. ">min</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944" title="Calculates per-element maximum of two matrices. ">max</a> </dd></dl>
</div>
</div>
<a id="gad538f94c264624d0ea78b853d53adcb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad538f94c264624d0ea78b853d53adcb2">◆ </a></span>threshold() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> cv::gapi::threshold </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>thresh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>maxval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>type</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.gapi.threshold(</td><td class="paramname">src, maxval, type</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>Applies a fixed-level threshold to each matrix element. </p>
<p>The function applies fixed-level thresholding to a single- or multiple-channel matrix. The function is typically used to get a bi-level (binary) image out of a grayscale image ( cmp functions could be also used for this purpose) or for removing a noise, that is, filtering out pixels with too small or too large values. There are several types of thresholding supported by the function. They are determined by type parameter.</p>
<p>Also, the special values <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a95251923e8e22f368ffa86ba8bce87ff" title="flag, use Otsu algorithm to choose the optimal threshold value ">cv::THRESH_OTSU</a> or <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a22ffcf680811aed95be6c7f5cd809621" title="flag, use Triangle algorithm to choose the optimal threshold value ">cv::THRESH_TRIANGLE</a> may be combined with one of the above values. In these cases, the function determines the optimal threshold value using the Otsu's or Triangle algorithm and uses it instead of the specified thresh . The function returns the computed threshold value in addititon to thresholded matrix. The Otsu's and Triangle methods are implemented only for 8-bit matrices.</p>
<p>Input image should be single channel only in case of <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a95251923e8e22f368ffa86ba8bce87ff" title="flag, use Otsu algorithm to choose the optimal threshold value ">cv::THRESH_OTSU</a> or <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a22ffcf680811aed95be6c7f5cd809621" title="flag, use Triangle algorithm to choose the optimal threshold value ">cv::THRESH_TRIANGLE</a> flags. Output matrix must be of the same size and depth as src.</p>
<dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.threshold"</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>input matrix (<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga81df635441b21f532fdace401e04f588">CV_8UC1</a>, <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga88c4cd9de76f678f33928ef1e3f96047">CV_8UC3</a>, or <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga32ec76240e43e4c9c7b2e2785180a7e6">CV_32FC1</a>). </td></tr>
    <tr><td class="paramname">thresh</td><td>threshold value. </td></tr>
    <tr><td class="paramname">maxval</td><td>maximum value to use with the <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a147222a96556ebc1d948b372bcd7ac59" title=" ">cv::THRESH_BINARY</a> and <a class="el" href="../../d7/d1b/group__imgproc__misc.html#ggaa9e58d2860d4afa658ef70a9b1115576a19120b1a11d8067576cc24f4d2f03754" title=" ">cv::THRESH_BINARY_INV</a> thresholding types. </td></tr>
    <tr><td class="paramname">type</td><td>thresholding type (see the <a class="el" href="../../d7/d1b/group__imgproc__misc.html#gaa9e58d2860d4afa658ef70a9b1115576">cv::ThresholdTypes</a>).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d0/d86/group__gapi__matrixop.html#gab714c7a4adc847d75bfc080ac92924f4" title="Calculates per-element minimum of two matrices. ">min</a>, <a class="el" href="../../d0/d86/group__gapi__matrixop.html#ga0ff081ea80eb39a96389c16ac0f9e944" title="Calculates per-element maximum of two matrices. ">max</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#gae7804b39335c3a62d21e7afd1c1fa566" title="Performs the per-element comparison of two matrices checking if elements from first matrix are greate...">cmpGT</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#ga1a745b957e7f94c416a5773a13524576" title="Performs the per-element comparison of two matrices checking if elements from first matrix are less o...">cmpLE</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#ga2b13187939387e99b4a7dbc497d9d52d" title="Performs the per-element comparison of two matrices checking if elements from first matrix are greate...">cmpGE</a>, <a class="el" href="../../d1/db2/group__gapi__pixelwise.html#gaa67732d475ab1df386eebff7b90895da" title="Performs the per-element comparison of two matrices checking if elements from first matrix are less t...">cmpLT</a> </dd></dl>
</div>
</div>
<a id="ga33361fa1e5bdd6201cb23ced85e7eeae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga33361fa1e5bdd6201cb23ced85e7eeae">◆ </a></span>threshold() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::tuple&lt;<a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a>, <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a>&gt; cv::gapi::threshold </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../df/daa/classcv_1_1GMat.html">GMat</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d9/d98/classcv_1_1GScalar.html">GScalar</a> &amp; </td>
          <td class="paramname"><em>maxval</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>type</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.gapi.threshold(</td><td class="paramname">src, maxval, type</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d4/df9/gapi_2include_2opencv2_2gapi_2core_8hpp.html">opencv2/gapi/core.hpp</a>&gt;</code></p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function applicable for all threshold types except CV_THRESH_OTSU and CV_THRESH_TRIANGLE </p><dl class="section note"><dt>Note</dt><dd>Function textual ID is "org.opencv.core.matrixop.thresholdOT" </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
